<?php
function get_qiniu_cdn_url($pic_name){
    $driverConfig = C('UPLOAD_SITEIMG_QINIU.driverConfig');
    $domain = $driverConfig['domain'];
    // 返回false就是找不到，也就是七牛云的cdn地址
    if(strstr($pic_name, 'http')){
        return $pic_name;
    }
    return 'http://'.$domain.'/'.$pic_name;
}

function list_qiniu_cdn_url($arr,$filed='picname'){
    foreach ($arr as $k => $item) {
        $arr[$k][$filed] = get_qiniu_cdn_url($item[$filed]);
    }
    return $arr;
}
